#include "separator.hpp"
#include "imgui.h"

void separator::update_data (bindable_base *data)
{
    if (text_)
        text_->attach(data);
}

void separator::init_content (const xml_node &node)
{
    text_ = create_data(node.attribute("text").as_string(), std_string | c_string);
}

void separator::draw_self ()
{
    if (text_)
    {
        std::string str = text_->get_std_string();
        ImGui::SeparatorText(str.c_str());

    }
    else
    {
        ImGui::Separator();
    }
}
